"""
DAQ应用程序配置文件
包含所有硬编码的常量、默认值和配置参数
"""

# 应用程序基本配置
APP_TITLE = "LLRF Data Process (csv version author: xu)"
APP_GEOMETRY = (100, 100, 480, 800)  # x, y, width, height
CONTROLS_PANEL_MAX_WIDTH = 450

# 默认通道名称
DEFAULT_CHANNEL_NAMES = [
    'Pt', 'Ref', 'Pf', 'Pr1', 'pf2', 'pr2', 'pt2', 'Backup',
    'Err', 'dErr', 'PI_FB', 'PI+FF', 'FF1', 'FF2', 'Mod', 'DAC'
]

# 默认文件名显示文本
DEFAULT_FILENAME_DISPLAY = "Display the filename you have selected"

# 默认参数值
DEFAULT_SAMPLING_FREQ = "0.1"  # MHz
DEFAULT_TIME_START = "0"
DEFAULT_TIME_END = "100"
DEFAULT_FREQ_START = "0"
DEFAULT_FREQ_END = "10000"
DEFAULT_SEL = "4"
DEFAULT_BETA = "1e10"

# 绘图样式默认值
DEFAULT_FONT_SIZE = "10"
DEFAULT_LINE_WIDTH = "1"
DEFAULT_FIGURE_WIDTH = "8"
DEFAULT_FIGURE_HEIGHT = "6"

# 可选项列表
FONT_SIZE_OPTIONS = ["6", "8", "10", "12", "14", "16"]
LINE_WIDTH_OPTIONS = ["0.5", "1", "1.5", "2", "2.5"]
FIGURE_WIDTH_OPTIONS = [str(i) for i in range(5, 21)]
FIGURE_HEIGHT_OPTIONS = [str(i) for i in range(4, 16)]
TIME_UNIT_OPTIONS = ["[us]", "[ms]", "[s]", "[samples]"]
FREQ_UNIT_OPTIONS = ["[Hz]", "[kHz]", "[MHz]"]

# 文件处理配置
CSV_HEADER_SKIP_ROWS = 10
SPURIOUS_THRESHOLD_HIGH = 100
SPURIOUS_THRESHOLD_LOW = -100
SPURIOUS_COUNT_THRESHOLD = 3

# 时间单位换算
TIME_UNIT_SCALES = {
    '[us]': 1e6,
    '[ms]': 1e3,
    '[s]': 1,
    '[samples]': None  # 需要动态计算
}

# 菜单和快捷键
MENU_SHORTCUTS = {
    'load_files': 'Ctrl+O',
    'exit': 'Ctrl+Q'
}

# 应用程序信息
APP_ABOUT_TEXT = "DAQ plotting tool converted to PyQt." 